﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EntityMode
{
    /// <summary>
    /// 职工信息表
    /// </summary>
    public class Employee
    {
        /// <summary>
        /// 数据唯一标识符
        /// </summary>
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        [Required]
        [Key]
        public Guid Id { get; set; }

        /// <summary>
        /// enum:
        ///0：领导
        ///1：党务人员
        ///2：雇员
        /// </summary>
        [Required]
        public int Postion { get; set; }

        /// <summary>
        /// 薪资
        /// </summary>
        [Required]
        public float Salary { get; set; }

        /// <summary>
        /// 姓
        /// </summary>
        [Required]
        [StringLength(20)]
        public string? FirstName { get; set; }

        /// <summary>
        /// 名
        /// </summary>
        [Required]
        [StringLength(20)]
        public string? LastName { get; set; }

        /// <summary>
        /// 居住地址
        /// </summary>
        [Required]
        [StringLength(150)]
        public string? Address { get; set; }

        /// <summary>
        /// 年龄
        /// </summary>
        [Required]
        public int Age { get; set; }

        /// <summary>
        /// 性别
        /// </summary>
        [Required]
        public bool Gender { get; set; }

        /// <summary>
        /// 参加工作日期
        /// </summary>
        [Required]
        public DateTime WorkingDate { get; set; }

        /// <summary>
        /// 注册时间
        /// </summary>
        [Required]
        public DateTime AddTime { get; set; }
    }
}
